﻿@{
    var user = Context.Session.getValue<WqUser>("LoginUser");
}

<nav class="navbar-default navbar-static-side" role="navigation">
    <div class="sidebar-collapse">
        <ul class="nav" id="side-menu">
            <li class="nav-header">
                <div class="logo-element">
                    <a href="/manage/article/index">后台</a>
                </div>
            </li>
            <li class="@Html.IsSelected(controller:"Divination") @Html.IsSelected(controller:"Hot") @Html.IsSelected(controller:"HeaderContent")">
                <a><i class="fa fa-pencil" title="常用功能"></i><span class="nav-label" data-i18n="nav.dashboard">常用功能</span></a>
                <ul class="nav nav-second-level">
                    <li class="@Html.IsSelected(action: "DiviningList", controller: "Divination")">
                        <a href="@Url.Action(nameof(DivinationController.DiviningHideList), "Divination")">八字简批</a>
                    </li>
                    <li class="@Html.IsSelected(action: "Article", controller: "Hot")">
                        <a href="@Url.Action(nameof(HotController.Article), "Hot")">热门链接<span style="color:red;">(置顶)</span></a>
                    </li>
                    <li class="@Html.IsSelected(action: "Detail", controller: "HeaderContent")">
                        <a href="@Url.Action(nameof(HeaderContentController.Deatil), "HeaderContent")" title="网站的布局内容设置">布局内容设置</a>
                    </li>
                </ul>
            </li>

            @{
                if (user.IsAdmin || user.UserAuth.HasFlag(WqUserAuth.Admin))
                {
                    <li class="@Html.IsSelected(controller:"Account")">
                        <a><i class="fa fa-file-text-o" title="网站用户管理"></i><span class="nav-label" data-i18n="nav.dashboard">用户管理</span></a>
                        <ul class="nav nav-second-level">
                            <li class="@Html.IsSelected(action: "List", controller: "Account")">
                                <a href="@Url.Action(nameof(AccountController.List), "Account")">用户列表</a>
                            </li>
                        </ul>
                    </li>
                }
            }

            <li class="@Html.IsSelected(controller:"Category") @Html.IsSelected(controller: "Article")">
                <a><i class="fa fa-file-text-o" title="文章与分类设置"></i><span class="nav-label" data-i18n="nav.dashboard">文章与分类</span></a>
                <ul class="nav nav-second-level">
                    <li class="@Html.IsSelected(action: "Notice", controller: "Article")">
                        <a href="@Url.Action(nameof(ArticleController.Notice), "Article")">设置公告</a>
                    </li>
                    <li class="@Html.IsSelected(action: "List", controller: "Category")">
                        <a href="@Url.Action("List", "Category")">分类管理</a>
                    </li>
                    <li class="@Html.IsSelected(action: "List", controller: "Article") @Html.IsSelected(action: "HideList", controller: "Article")">
                        <a href="@Url.Action("List", "Article")">文章管理</a>
                    </li>
                </ul>
            </li>

            <li class="@Html.IsSelected(controller:"WechatMessage")">
                <a><i class="fa fa-file-text-o" title="微信消息回复"></i><span class="nav-label" data-i18n="nav.dashboard">微信消息</span></a>
                <ul class="nav nav-second-level">
                    <li class="@Html.IsSelected(action: "List", controller: "WechatMessage")">
                        <a href="@Url.Action(nameof(WechatMessageController.List), "WechatMessage")">微信未读消息</a>
                    </li>
                </ul>
            </li>
            <li class="@Html.IsSelected(controller:"Setting")">
                <a><i class="fa fa-file-text-o" title="网站配置设置"></i><span class="nav-label" data-i18n="nav.dashboard">网站设置</span></a>
                <ul class="nav nav-second-level">
                    <li class="@Html.IsSelected(action: "SiteTitleName", controller: "Setting")">
                        <a href="@Url.Action(nameof(SettingController.SiteTitleName), "Setting")">网站标题设置</a>
                    </li>
                </ul>
            </li>

            <li class="@Html.IsSelected(controller:"Crawler")">
                <a><i class="fa fa-file-text-o" title="爬虫内容管理"></i><span class="nav-label" data-i18n="nav.dashboard">爬虫管理</span></a>
                <ul class="nav nav-second-level">
                    <li class="@Html.IsSelected(action: "TagList", controller: "Crawler")">
                        <a href="@Url.Action(nameof(CrawlerController.TagList), "Crawler")">爬虫分类标签</a>
                    </li>
                    <li class="@Html.IsSelected(action: "List", controller: "Crawler")">
                        <a href="@Url.Action(nameof(CrawlerController.List), "Crawler")">获取的文章列表</a>
                    </li>
                </ul>
            </li>
        </ul>
    </div>
</nav>